<%@page import="model.Mycomment"%>
<%@ page import="java.util.List"%>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="main.css">
<title>Editor Inspection </title>
</head>
<body>

<%
String name = (String) session.getAttribute("username");
List<Mycomment> commentList = (List<Mycomment>) request.getAttribute("comments");
String comment_num = (String) request.getAttribute("comment_num");


if(name==null){
    out.print("Please login first! redirecting to Login...");
    response.setHeader("Refresh","1;URL=login.jsp");
}
else{
	out.print("Hello, " + name);
}
%>

<center>
<h2>Editor Inspection</h2><br>
<h3>Inspect User's Comments</h3>
<table>
<%
	if(commentList!=null){
		for (Mycomment cm: commentList){
			out.print("<tr><td>" + cm.getCommentid() + "</td><td>"+ cm.getContent() +"</td></tr>");
		}
	}
%>
</table>
<h3>Check application for merchants</h3>
</center>
</body>
</html>